﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Runtime.Serialization;
using System.ServiceModel;
using System.Text;

namespace WCF_CM
{
    // NOTE: You can use the "Rename" command on the "Refactor" menu to change the class name "User" in both code and config file together.
    public class UserService : IUserService
    {
        User aUser = new User();
            

        public List<UserService> GetUsers() //version 02
        {
            return aUser.GetUsers();

        }
        
        public static string AddUser()
        {
              return aUser.AddUser();
        }

        public List<UserService> FindUser()
        {
            return aUser.FindUser();
        }


        public string UpdateUser()
        {
            aUser.UpdateUser();
        }

        public string DeleteUser()
        {
            aUser.DeleteUser();
                
        }

        public bool IsDisabled() //Diableing can be accomplished through the UPDATE method
        {
            return true; // can also return false
        }

        public string AssignUser(UserService user) //should be accomplished through the ADD and UPDATE methods,... just not sure how.
        {
            string result = string.Empty;
            //code
            return result;
        }

        public List<Group> GetGroupsForUser(UserService user) // returns the groups the user belongs too
        {
            
            List<Group> Group = new List<Group>();

            return Group.GetGroupsForUser();                   
            
        }

        public List<Attrib> GetAttribforUser(UserService user) //returns the attributes of a user
        {
            
            List<Attrib> Attrib = new List<Attrib>(); //creates a list we can put our table into
                      
            return Attrib.GetAttribforUser();
        }
        
            
    }
}
